import { NextResponse } from 'next/server';
import { api } from '@/lib/apiService';

export async function GET() {
  try {
    // 调用Python后端的健康检查API
    const response = await api.get('health');
    return NextResponse.json(response, { status: 200 });
  } catch (error) {
    console.error('Health check error:', error);
    return NextResponse.json(
      { 
        status: 'unhealthy', 
        error: error.message, 
        timestamp: new Date().toISOString()
      },
      { status: 500 }
    );
  }
}